<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>地址管理</title>

		<link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="../css/personal.css" rel="stylesheet" type="text/css">
		<link href="../css/addstyle.css" rel="stylesheet" type="text/css">
		<script src="../AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
		<script src="../AmazeUI-2.4.2/assets/js/amazeui.js"></script>
		<script type="text/javascript">
            cityareaname=new Array(35);
            cityareacode=new Array(35);
            cityareacode[0] = new Array('0101', '0102', '0103', '0104', '0105', '0106', '0107', '0108');
            cityareaname[0] = new Array('东城区', '西城区', '崇文区', '宣武区', '朝阳区', '海淀区', '丰台区', '石景山');
            cityareacode[1]=new Array('0201','0202','0203','0204','0205','0206');
            cityareaname[1]=new Array('罗湖','福田','南山','盐田','宝安','龙岗');
            cityareacode[2] = new Array('0301', '0302', '0303', '0304', '0305', '0306', '0307', '0308', '0309', '0310', '0311', '0312', '0313', '0314', '0315', '0316', '0317', '0318', '0319', '0320');
            cityareaname[2] = new Array('宝山', '金山', '南市', '长宁', '静安', '青浦', '崇明', '卢湾', '松江', '奉贤', '浦东', '杨浦', '虹口', '普陀', '闸北', '黄浦', '闵行', '徐汇', '嘉定', '南汇');
            cityareacode[3] = new Array('0401', '0402', '0403', '0404', '0405', '0406');
            cityareaname[3] = new Array('渝中', '江北', '沙坪坝', '南岸', '九龙坡', '大渡口');
            cityareacode[4]=new Array('0501','0502','0503','0504','0505','0506','0507','0508','0509','0510','0511','0512','0513','0514','0515');
            cityareaname[4]=new Array('和平','河北','河西','河东','南开','红桥','塘沽','汉沽','大港','东丽','西青','津南','北辰','武清','滨海');
            cityareacode[5]=new Array('0601','0602','0603','0604','0605','0606','0607','0608','0609','0610','0611','0612','0613','0614','0615');
            cityareaname[5]=new Array('广州','珠海','中山','佛山','东莞','清远','肇庆','阳江','湛江','韶关','惠州','河源','汕尾','汕头','梅州');
            cityareacode[6]=new Array('0701','0702','0703','0704','0705','0706','0707','0708','0709','0710','0711');
            cityareaname[6]=new Array('石家庄','唐山','秦皇岛','邯郸','邢台','张家口','承德','廊坊','沧州','保定','衡水');
            cityareacode[7]=new Array('0801','0802','0803','0804','0805','0806','0807');
            cityareaname[7]=new Array('太原','大同','阳泉','朔州','长治','临汾','晋城');
            cityareacode[8]=new Array('0901','0902','0903','0904','0905','0906','0907','0908','0909','0910','0911');
            cityareaname[8]=new Array('呼和浩特','包头','乌海','临河','东胜','集宁','锡林浩特','通辽','赤峰','海拉尔','乌兰浩特');
            cityareacode[9]=new Array('1001','1002','1003','1004','1005','1006','1007','1008','1009','1010','1011','1012','1013','1014');
            cityareaname[9]=new Array('沈阳','大连','鞍山','锦州','丹东','盘锦','铁岭','抚顺','营口','辽阳','阜新','本溪','朝阳','葫芦岛');
            cityareacode[10]=new Array('1101','1102','1103','1104','1105','1106','1107','1108','1109');
            cityareaname[10]=new Array('长春','吉林','四平','辽源','通化','白山','松原','白城','延边');
            cityareacode[11]=new Array('1201','1202','1203','1204','1205','1206','1207','1208','1209','1210','1211','1212','1213');
            cityareaname[11]=new Array('哈尔滨','齐齐哈尔','牡丹江','佳木斯','大庆','伊春','黑河','鸡西','鹤岗','双鸭山','七台河','绥化','大兴安岭');
            cityareacode[12]=new Array('1301','1302','1303','1304','1305','1306','1307','1308','1309','1310','1311','1312','1313');
            cityareaname[12]=new Array('南京','苏州','无锡','常州','镇江','连云港 ','扬州','徐州 ','南通','盐城','淮阴','泰州','宿迁');
            cityareacode[13]=new Array('1401','1402','1403','1404','1405','1406','1407','1408','1409','1410','1411');
            cityareaname[13]=new Array('杭州','湖州','丽水','温州','绍兴','舟山','嘉兴','金华','台州','衢州','宁波');
            cityareacode[14]=new Array('1501','1502','1503','1504','1505','1506','1507','1508','1509','1510','1511','1512','1513','1514','1515','1516','1517');
            cityareaname[14]=new Array('合肥 ','芜湖 ','蚌埠 ','滁州 ','安庆 ','六安 ','黄山 ','宣城 ','淮南 ','宿州 ','马鞍山 ','铜陵','淮北 ','阜阳 ','池州 ','巢湖 ','亳州');
            cityareacode[15]=new Array('1601','1602','1603','1604','1605','1606','1607','1608','1609');
            cityareaname[15]=new Array('福州 ','厦门 ','泉州 ','漳州 ','龙岩 ','南平 ','宁德 ','莆田 ','三明');
            cityareacode[16]=new Array('1701','1702','1703','1704','1705','1706','1707','1708','1709','1710','1711');
            cityareaname[16]=new Array('南昌','景德镇','九江','萍乡','新余','鹰潭','赣州','宜春','吉安','上饶','抚州');
            cityareacode[17]=new Array('1801','1802','1803','1804','1805','1806','1807','1808','1809','1810','1811','1812','1813','1814','1815','1816','1817');
            cityareaname[17]=new Array('济南','青岛','淄博','德州','烟台','潍坊','济宁','泰安','临沂','菏泽','威海','枣庄','日照','莱芜','聊城','滨州','东营');
            cityareacode[18]=new Array('1901','1902','1903','1904','1905','1906','1907','1908','1909','1910','1911','1912','1913','1914','1915','1916','1917','1918');
            cityareaname[18]=new Array('郑州','开封','洛阳','平顶山','安阳','鹤壁','新乡','焦作','濮阳','许昌','漯河','三门峡','南阳','商丘','周口','驻马店','信阳','济源');
            cityareacode[19]=new Array('2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','2016','2017');
            cityareaname[19]=new Array('武汉','黄石','十堰','荆州','宜昌','襄樊','鄂州','荆门','孝感','黄冈','咸宁','恩施','随州','仙桃','天门','潜江','神农架');
            cityareacode[20]=new Array('2101','2102','2103','2104','2105','2106','2107','2108','2109','2110','2111','2112','2113');
            cityareaname[20]=new Array('长沙','株州','湘潭','衡阳','邵阳','岳阳','常德','郴州','益阳','永州','怀化','娄底','湘西 ');
            cityareacode[21]=new Array('2201','2202','2203','2204','2205','2206','2207','2208','2209','2210','2211','2212');
            cityareaname[21]=new Array('南宁','柳州','桂林','梧州','北海','防城港','钦州','贵港','玉林','贺州','百色','河池');
            cityareacode[22]=new Array('2301','2302','2303','2304','2305','2306','2307','2308','2309');
            cityareaname[22]=new Array('海口 ','三亚','通什','琼海','琼山','文昌','万宁','东方','儋州');
            cityareacode[23]=new Array('2401','2402','2403','2404','2405','2406','2407','2408','2409','2410','2411','2412','2413','2414','2415','2416','2417','2418','2419','2420');
            cityareaname[23]=new Array('成都','自贡','攀枝花','泸州','德阳','绵阳','广元','遂宁','内江','乐山','南充 ','宜宾','广安','达川','巴中','雅安','眉山 ','阿坝 ','甘孜 ','凉山 ');
            cityareacode[24]=new Array('2501','2502','2503','2504','2505','2506','2507','2508','2509');
            cityareaname[24]=new Array('贵阳 ','六盘水','遵义','铜仁','毕节','安顺','黔西南 ','黔东南','黔南');
            cityareacode[25]=new Array('2601','2602','2603','2604','2605','2606','2607','2608','2609','2610','2611','2612','2613','2614','2615','2616','2617');
            cityareaname[25]=new Array('昆明','东川','曲靖','玉溪','昭通','思茅','临沧','保山','丽江','文山 ','红河 ','西双版纳 ','楚雄 ','大理 ','德宏 ','怒江','迪庆');
            cityareacode[26]=new Array('2701','2702','2703','2704','2705','2706','2707');
            cityareaname[26]=new Array('拉萨','那曲','昌都','山南','日喀则','阿里','林芝');
            cityareacode[27]=new Array('2801','2802','2803','2804','2805','2806','2807','2808','2809','2810');
            cityareaname[27]=new Array('西安','铜川','宝鸡','咸阳','渭南','延安','汉中','榆林','商洛','安康');
            cityareacode[28]=new Array('2901','2902','2903','2904','2905','2906','2907','2908','2909','2910','2911','2912','2913','2914');
            cityareaname[28]=new Array('兰州','金昌','白银','天水','嘉峪关','定西','平凉','庆阳','陇南','武威','张掖','酒泉','甘南 ','临夏');
            cityareacode[29]=new Array('3001','3002','3003','3004','3005','3006','3007','3008');
            cityareaname[29]=new Array('西宁','海东',' 海北 ','黄南','海南','果洛','玉树','海西');
            cityareacode[30]=new Array('3101','3102','3103','3104');
            cityareaname[30]=new Array('银川','石嘴山','银南','固原');
            cityareacode[31]=new Array('3201','3202','3203','3204','3205','3206','3207','3208','3209','3210','3211','3212','3213');
            cityareaname[31]=new Array('乌鲁木齐','克拉玛依','石河子','吐鲁番','哈密','和田','阿克苏','喀什','克孜勒苏','巴音郭楞','昌吉','博尔塔拉','伊犁');
            cityareacode[32]=new Array();
            cityareaname[32]=new Array();
            cityareacode[33]=new Array();
            cityareaname[33]=new Array();
            cityareacode[34]=new Array();
            cityareaname[34]=new Array();
            function city(value) {
                //console.log(cityareacode[value-1].length);
                $("#city").empty();
                for(var i=0;i<cityareacode[value-1].length;i++){
                    console.log(cityareaname[value-1][i]);
                    $("#city").append('<option value="">'+cityareaname[value-1][i]+'</option>');
                }
            }


          function address() {
                var a1 =$("#province option:selected").text();
                var a2 =$("#city option:selected").text();
                console.log(address+"\n"+a1+"\n"+a2);
                $("#address").val(a1);
                $("#address").siblings(".city").val(a2);

            }
            function submit1() {
                address();
                $("#addressform").submit();
            }

            function selectcity() {
                var a1 =$("#province").val();
                console.log(a1);
                city(a1);
            }

		</script>
	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->

					<div class="am-container header">
						<%@include file="/loginhead.jsp"%>
						<%--<ul class="message-l">
							<div class="topMessage">
								<div class="menu-hd">
									<a href="#" target="_top" class="h">亲，请登录</a>
									<a href="#" target="_top">免费注册</a>
								</div>
							</div>
						</ul>
						<ul class="message-r">
							<div class="topMessage home">
								<div class="menu-hd"><a href="#" target="_top" class="h">商城首页</a></div>
							</div>
							<div class="topMessage my-shangcheng">
								<div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
							</div>
							<div class="topMessage mini-cart">
								<div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
							</div>
					&lt;%&ndash;		<div class="topMessage favorite">
								<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>&ndash;%&gt;
						</ul>--%>
						</div>

						<!--悬浮搜索框-->

						<div class="nav white">
							<div class="logoBig">
								<li><img src="../images/logobig.png" /></li>
							</div>
							<%@include file="/searchhead.jsp"%>
							<%--<div class="search-bar pr">
								<a name="index_none_header_sysc" href="#"></a>
								<form>
									<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
									<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
								</form>
							</div>--%>
						</div>

						<div class="clear"></div>
					</div>
				</div>
			</article>
		</header>

		<div class="nav-table">
			<div class="long-title"><span class="all-goods">全部分类</span></div>
			<div class="nav-cont">
				<ul>
					<li class="index"><a href="/home.jsp">首页</a></li>
				<%--	<li class="qc"><a href="#">闪购</a></li>
					<li class="qc"><a href="#">限时抢</a></li>
					<li class="qc"><a href="#">团购</a></li>
					<li class="qc last"><a href="#">大包装</a></li>--%>
				</ul>
				<%--<div class="nav-extra">
					<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
					<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
				</div> --%>
			</div>
		</div>
		<b class="line"></b>

		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-address">
						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">地址管理</strong> / <small>Address&nbsp;list</small></div>
						</div>
						<hr/>
						<ul class="am-avg-sm-1 am-avg-md-3 am-thumbnails">

							<li class="user-addresslist defaultAddr">
								<span class="new-option-r"><i class="am-icon-check-circle"></i>默认地址</span>
								<p class="new-tit new-p-re">
									<span class="new-txt">${user.name }</span>
									<span class="new-txt-rd2">${user.tel }</span>
								</p>
								<div class="new-mu_l2a new-p-re">
									<p class="new-mu_l2cw">
										<span class="title">地址：</span>
										<span class="province">${user.province }</span>
										<span class="city">${user.city }</span>
										<!-- <span class="dist">洪山</span>区 -->
										<span class="street">${user.street }</span></p>
								</div>
								<div class="new-addr-btn">
									<!-- <a href="#"><i class="am-icon-edit"></i>编辑</a>
									<span class="new-addr-bar">|</span>
									<a href="javascript:void(0);" onclick="delClick(this);"><i class="am-icon-trash"></i>删除</a> -->
								</div>
							</li>

							<!-- <li class="user-addresslist">
								<span class="new-option-r"><i class="am-icon-check-circle"></i>设为默认</span>
								<p class="new-tit new-p-re">
									<span class="new-txt">小叮当</span>
									<span class="new-txt-rd2">159****1622</span>
								</p>
								<div class="new-mu_l2a new-p-re">
									<p class="new-mu_l2cw">
										<span class="title">地址：</span>
										<span class="province">湖北</span>省
										<span class="city">武汉</span>市
										<span class="dist">洪山</span>区
										<span class="street">雄楚大道666号(中南财经政法大学)</span></p>
								</div>
								<div class="new-addr-btn">
									<a href="#"><i class="am-icon-edit"></i>编辑</a>
									<span class="new-addr-bar">|</span>
									<a href="javascript:void(0);" onclick="delClick(this);"><i class="am-icon-trash"></i>删除</a>
								</div>
							</li> -->
							<!-- <li class="user-addresslist">
								<span class="new-option-r"><i class="am-icon-check-circle"></i>设为默认</span>
								<p class="new-tit new-p-re">
									<span class="new-txt">小叮当</span>
									<span class="new-txt-rd2">159****1622</span>
								</p>
								<div class="new-mu_l2a new-p-re">
									<p class="new-mu_l2cw">
										<span class="title">地址：</span>
										<span class="province">湖北</span>省
										<span class="city">武汉</span>市
										<span class="dist">洪山</span>区
										<span class="street">雄楚大道666号(中南财经政法大学)</span></p>
								</div>
								<div class="new-addr-btn">
									<a href="#"><i class="am-icon-edit"></i>编辑</a>
									<span class="new-addr-bar">|</span>
									<a href="javascript:void(0);" onclick="delClick(this);"><i class="am-icon-trash"></i>删除</a>
								</div>
							</li> -->
						</ul>
						<div class="clear"></div>
						<a class="new-abtn-type" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0}">添加新地址</a>
						<!--例子-->
						<div class="am-modal am-modal-no-btn" id="doc-modal-1">

							<div class="add-dress">

								<!--标题 -->
								<div class="am-cf am-padding">
									<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">编辑</strong> / <small>edit&nbsp;address</small></div>
								</div>
								<hr/>

								<div class="am-u-md-12 am-u-lg-8" style="margin-top: 20px;">
									<form class="am-form am-form-horizontal" action="<%=path %>/user/edit" id="addressform">

										<%--<div class="am-form-group">
											<label for="user-name" class="am-form-label">收货人</label>
											<div class="am-form-content">
												<input type="text" id="user-name" name="uname" placeholder="${user.name }" readonly="true">
											</div>
										</div>--%>

										<%--<div class="am-form-group">
											<label for="user-phone" class="am-form-label">手机号码</label>
											<div class="am-form-content">
												<input id="user-phone" name="tel" placeholder="手机号必填" type="email">
											</div>
										</div>--%>
										<div class="am-form-group">
											<label for="user-address" class="am-form-label">所在地</label>
											<div class="am-form-content address">
												<%--<select data-am-selected name="province">
													<option value="浙江省">浙江省</option>
													<option value="湖北省" selected>湖北省</option>
												</select>
												<select data-am-selected name="city">
													<option value="温州市">温州市</option>
													<option value="武汉市" selected>武汉市</option>
												</select>--%>
													<select id="province"  onchange="selectcity()">
														<%--<option value="浙江省">浙江省</option>
                                                        <option value="湖北省">湖北省</option>--%>
														<option value="1" selected="selected">北京</option><option value="2">深圳</option><option value="3">上海</option><option value="4">重庆</option><option value="5">天津</option><option value="6">广东</option><option value="7">河北</option><option value="8">山西</option><option value="9">内蒙古</option><option value="10">辽宁</option><option value="11">吉林</option><option value="12">黑龙江</option><option value="13">江苏</option><option value="14">浙江</option><option value="15">安徽</option><option value="16">福建</option><option value="17">江西</option><option value="18">山东</option><option value="19">河南</option><option value="20">湖北</option><option value="21">湖南</option><option value="22">广西</option><option value="23">海南</option><option value="24">四川</option><option value="25">贵州</option><option value="26">云南</option><option value="27">西藏</option><option value="28">陕西</option><option value="29">甘肃</option><option value="30">青海</option><option value="31">宁夏</option><option value="32">新疆</option><option value="33">香港</option><option value="34">澳门</option><option value="35">台湾</option>
													</select>

													<select id="city" >
														<option value="0101" selected="selected">东城区</option><option value="0102">西城区</option><option value="0103">崇文区</option><option value="0104">宣武区</option><option value="0105">朝阳区</option><option value="0106">海淀区</option><option value="0107">丰台区</option><option value="0108">石景山</option>
													</select>
												<%--<select data-am-selected name="street">
													<option value="a">瑞安区</option>
													<option value="b" selected>洪山区</option>
												</select>--%>
											<span class="buy--address-detail">
												<input type="hidden" style="border:none;width: 50px" name="province" class="province" id="address" value="" readonly/>
												<input type="hidden" style="border:none;width: 50px" name="city" class="city" value="" readonly/>
											</span>
											</div>
										</div>

										<div class="am-form-group">
											<label for="user-intro" class="am-form-label">详细地址</label>
											<div class="am-form-content">
												<textarea class="" rows="3" id="user-intro" placeholder="输入详细地址" name="detail"></textarea>
												<small>100字以内写出你的详细地址...</small>
											</div>
										</div>

										<div class="am-form-group">
											<div class="am-u-sm-9 am-u-sm-push-3">
												<a class="am-btn am-btn-danger" onclick="submit1()">保存</a>
												<%--<a href="javascript: void(0)" class="am-close am-btn am-btn-danger" data-am-modal-close>取消</a>--%>
											</div>
										</div>
									</form>
								</div>

							</div>

						</div>

					</div>

					<script type="text/javascript">
						$(document).ready(function() {							
							$(".new-option-r").click(function() {
								$(this).parent('.user-addresslist').addClass("defaultAddr").siblings().removeClass("defaultAddr");
							});
							
							var $ww = $(window).width();
							if($ww>640) {
								$("#doc-modal-1").removeClass("am-modal am-modal-no-btn")
							}
							
						})
					</script>

					<div class="clear"></div>

				</div>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">恒望科技</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于恒望</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2015-2025 Hengwang.com 版权所有. 更多模板 <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></em>
						</p>
					</div>
				</div>
			</div>

			<aside class="menu">
				<ul>
					<li class="person">
						<%--<a href="<%=path%>/info/show">个人中心</a>--%>
						<ul>
							<li > <a href="<%=path%>/info/show">个人信息</a></li>
							<!-- <li> <a href="safety.html">安全设置</a></li> -->
							<%--<li> <a href="<%=path %>/user/showad">收货地址</a></li>--%>
						</ul>
					</li>
					<li class="person">
						<%--<a href="#">个人资料</a>--%>
						<ul>
							<%--<li class="active"> <a href="<%=path%>/info/show">个人信息</a></li>--%>
							<!-- <li> <a href="safety.html">安全设置</a></li> -->
							<li class="active"> <a href="<%=path %>/user/showad">收货地址</a></li>
						</ul>
					</li>
					<li class="person">
						<%--<a href="#">我的交易</a>--%>
						<ul>
							<li ><a href="<%=path %>/order/shorder">订单管理</a></li>
							<!-- <li> <a href="change.html">退款售后</a></li> -->
						</ul>
					</li>
					<li class="person">
						<%--<a href="#">我的小窝</a>--%>
						<ul>
							<!-- 		<li> <a href="collection.html">收藏</a></li>
                                    <li> <a href="foot.html">足迹</a></li> -->
							<li> <a href="<%=path %>/mycom/com">评价列表</a></li>
							<%--	<li> <a href="news.html">消息</a></li>--%>
						</ul>
					</li>

				</ul>

			</aside>
		</div>

	</body>

</html>